package com.bw.kotlindemo.java.base;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.MutableLiveData;

/**
 * desc:BaseViewModel
 * create by xushaodong on 2023/3/23
 */
public class BaseViewModel extends AndroidViewModel {
    public MutableLiveData<Boolean> errorVM = new MutableLiveData<>();
    public MutableLiveData<String> toastVM = new MutableLiveData<>();
    public MutableLiveData<Boolean> showLoadingVM = new MutableLiveData<>();
    public MutableLiveData<String> finishLoadingVM = new MutableLiveData<>();

    public BaseViewModel(@NonNull Application application) {
        super(application);
    }

    @Override
    protected void onCleared() {
        super.onCleared();
        //释放一些公共的资源

    }
}
